<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/mytags.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<%@ include file="/common/bootstrap.jsp"%>
<%@ include file="/common/jquery-treetable.jsp"%>
<script>
$(document).ready(function(){
	$("#tableList").treetable({expandable: true});
});
</script>
</head>

<body>
<div class="container-fluid">
	<form class="form-inline" action="index.html" method="get">    
	    <button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp; 
	    <button type="button" class="btn btn-success" id="addnew">新增用户</button>
	</form>
	
	<div class="container-fluid" align="center">
		<a href="#" onclick="jQuery('#tableList').treetable('expandAll'); return false;">展开所有</a>
    	<a href="#" onclick="jQuery('#tableList').treetable('collapseAll'); return false;">折叠所有</a>
	</div>
	
	<table id="tableList" class="table table-striped table-bordered table-hover">
 		<thead>
               <tr>
               	 <th>模板编号</th>
				 <th>模板名称</th>
				 <th>父模板编号</th>
				 <th>模板描述</th>
				 <th>模板图片</th>
                 <th>操作</th>
               </tr>
             </thead>
             <tbody>
               	<c:forEach items="${pageInfo.list}" var="obj">
				<tr data-tt-id="${obj.id}" <c:if test="${obj.pid!=0}">data-tt-parent-id="${obj.pid}"</c:if>>
               	 	<td>${obj.id}</td>
               	 	<td>${obj.templateName}</td>
               	 	<td>${obj.pid}</td>
               	 	<td>${obj.templateDesc}</td>
               	 	<td>${obj.templateImg}</td>
					<td>修改 删除</td>
				</tr>
				</c:forEach>
			</tbody>	
	</table>
</body>
</html>
